<template>
  <div>
    <h1>列表展开收起</h1>
    <div>
      <el-button @click="()=>{this.$router.push('/home')}">首页</el-button>
    </div>
    <ListFold id="list1" @onChange='this.onChange'/>
    <ListFold id="list2"/>
  </div>
</template>

<script>
import ListFold from '@/components/ListFold.vue';
export default {
  name: 'App',
  components: {
    ListFold
  },
  methods:{
    onChange(val){
      console.log('接收',val);
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
